import axios from "axios";
import {showLoading,hideLoading } from '@/utils/eloading'
const instance = axios.create({
    baseURL: 'http://api.jqrjq.cn',//请求基地址
    timeout: 6000
})
// 请求拦截器
instance.interceptors.request.use((config) => {
    showLoading();
    return config;
}, (err) => {
    return Promise.reject(err)
})

instance.interceptors.response.use((res) => {
    hideLoading();
    return res
}, (err) => {
    hideLoading();
    return Promise.reject(err)
})
export default instance;